package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.entity.Admin;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface AdminMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Admin record);

    int insertSelective(Admin record);

    Admin selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin record);

    Admin findOneByUsername(@Param("username") String username);

    List<Admin> findAllPage(PageReq req);

    List<Admin> findAllByIds(@Param("list") List<Long> list);

    List<Admin> findAllByRoles(@Param("list") List<Long> collect);

    int updateDeletedById(@Param("updatedDeleted")Byte updatedDeleted,@Param("id")Long id);

    Admin findOneByNickname(@Param("nickname") String nickname);
}